
using UnityEngine;

public class LevelButtonComponent : MonoBehaviour
{
	public bool IsLeft;
	public GameObject Level;

	GameController mGameController;

	public void OnClick()
	{
		Debug.Log("LevelButtonComponent.OnClock");

		if (mGameController == null)
		{
			mGameController = GameObject.Find("Main").
				GetComponent<TKMain>().gameController;
		}
		float percent = mGameController.CurrentLevel*1.0f/mGameController.MaxAvailableLevel;

		Level.GetComponent<UIScrollView>().SetDragAmount(percent, 0, true);
	}
}